home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
C-D
/
DeveloperStax.cpt
/
Developer Stack 1.0
/
background_14011.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
3KB
|
127 lines
-- background: 14011 from stack: in.0
-- bmap block id: 14709
-- flags: 4000
-- background id: 0
-- name: Mini Hyperstation
----- HyperTalk script -----
--
--messages from application buttons
--
on NoApp
global AppButton
put id of target into AppButton
InsertApp
end NoApp
on ChangeApp
global AppButton
put (id of target)+3 into AppButton
--If the button is blank then get application
if (the short name of button id AppButton) is space then
InsertApp
else
-- if appliation button is not blank, change or remove it
put the mouseloc into myPlace
put item 1 of myPlace - 20 into horiz
put item 2 of myPlace - 10 into vert
get PopUpMenu("Change Application;Remove Application",1,vert,horiz)
put it into PopUpSelected
-- user wants to change the application
if PopUpSelected =1 then InsertApp
--user wants to remove the current application
if PopUpSelected=2 then
set name of button id AppButton to space
set icon of button id AppButton to 0
set visible of button id (AppButton-1) to true
set visible of button id (AppButton-2) to true
end if
end if
end ChangeApp
on InsertApp
global AppButton
set hilite of target to false
put filename("APPL") into LongName
if LongName is empty then exit InsertApp
get script of button id AppButton
delete word 2 of line 2 of it
put ""&"e&LongName"e after word 1 of line 2 of it
set the script of button id AppButton to it
put ConvertButtonName(LongName) into shortName
--set the icon of the button
put long name of this stack into thisStack
put char 8 to (number of chars in thisStack - 1) of thisStack into thisStack
put GetAppIcon(LongName,LongName,thisStack) into iconNum
set icon of button id AppButton to iconNum
--set the name of the button
set the name of button id AppButton to shortName
set visible of button id (AppButton-1) to false
set visible of button id (AppButton-2) to false
end InsertApp
on ChangeDoc
answer "Did you send a disk for the next version?" with "Oops"
end ChangeDoc
on ChangeDA
answer "Did you send a disk for the next version?" with "Uh oh"
end ChangeDA
--
--functions
--
function ConvertButtonName LongName
put the length of LongName into nameLength
repeat with x = nameLength down to 1
if char x of LongName = ":" then exit repeat
end repeat
return char (x + 1) to nameLength of LongName
end ConvertButtonName
-- part 115 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=5 top=309 right=341 bottom=48
-- title width / last selected line: 0
-- icon id / first selected line: 29114 / 29114
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Button
----- HyperTalk script -----
on mouseUp
visual venetian blinds to gray
visual venetian blinds to black
visual venetian blinds to gray
visual venetian blinds
go back
end mouseUp
-- part 117 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=212 top=314 right=336 bottom=312
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Open Other...
----- HyperTalk script -----
on mouseUp
put filename("APPL") into openthis
if openthis is empty then exit mouseup
open openthis
end mouseUp